package com.zyj.springboothapim.controller;

import com.zyj.springboothapim.bean.Admin;
import com.zyj.springboothapim.bean.Charger;

import com.zyj.springboothapim.service.AdminService;
import com.zyj.springboothapim.service.ChargerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
//这个是默认json接收和发送@RestController
@RequestMapping("/Charger")
public class ChargerController {

    ChargerService chargerService;

    @Autowired
    public void setChargerService(ChargerService chargerService)
    {
        this.chargerService = chargerService;
    }


    //查询charger_table的所有信息
    @RequestMapping(value = "/selectCharger" ,method = {RequestMethod.POST,RequestMethod.GET})
    @ResponseBody
    public List<Charger> selectCharger(){
        System.out.println("/Charger/selectCharger");
        return chargerService.selectCharger();
    }

}
